/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package ormsamples;

import org.orm.*;
public class DeleteCandidatosVEPDSData {
	public void deleteTestData() throws PersistentException {
		PersistentTransaction t = orm_candidatos.CandidatosVEPDSPersistentManager.instance().getSession().beginTransaction();
		try {
			orm_candidatos.Candidatos lorm_candidatosCandidatos = orm_candidatos.CandidatosDAO.loadCandidatosByQuery(null, null);
			// Delete the persistent object
			orm_candidatos.CandidatosDAO.delete(lorm_candidatosCandidatos);
			t.commit();
		}
		catch (Exception e) {
			t.rollback();
		}
		
	}
	
	public static void main(String[] args) {
		try {
			DeleteCandidatosVEPDSData deleteCandidatosVEPDSData = new DeleteCandidatosVEPDSData();
			try {
				deleteCandidatosVEPDSData.deleteTestData();
			}
			finally {
				orm_candidatos.CandidatosVEPDSPersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
